package demo08.Facade_pattern.entity;
/**
 * 扩音器实体
 * */
public class Amplifier {
	String description;//描述
	Tuner tuner;//调谐器实体类
	DvdPlayer dvd;//dvd实体
	CdPlayer cd;//cd实体
	
	public Amplifier(String description) {
		this.description = description;
	}
 
	public void on() {
		System.out.println(description + " 打开");
	}
 
	public void off() {
		System.out.println(description + " 关闭");
	}
 
	public void setStereoSound() {
		System.out.println(description + " 立体模式");
	}
 
	public void setSurroundSound() {
		System.out.println(description + " 环绕声 (5 扬声器，1 低音炮)");
	}
 
	public void setVolume(int level) {
		System.out.println(description + " 设置音量" + level);
	}

	public void setTuner(Tuner tuner) {
		System.out.println(description + "设置调谐器 " + dvd);
		this.tuner = tuner;
	}
  
	public void setDvd(DvdPlayer dvd) {
		System.out.println(description + " 设置DVD播放器到 " + dvd);
		this.dvd = dvd;
	}
 
	public void setCd(CdPlayer cd) {
		System.out.println(description + " 设置CD播放机到 " + cd);
		this.cd = cd;
	}
 
	public String toString() {
		return description;
	}
}
